#pragma once

#include "Transition.h"
#include "ListeTransitions.h"

#include <vector>

using std::vector;

class ListeEtats;
class Etiquette;

class Etat {
public:
	Etat();
	Etat(unsigned id, bool initial = false, bool terminal = false);
	~Etat();

	unsigned getId() const;
	bool estInitial() const;
	bool estTerminal() const;

	bool existeTrans(char c);
	ListeEtats cible(char c);
	ListeEtats cible();
	void ajouterTransition(Etiquette c, Etat* e);
	void retirerTransition(unsigned id);
	Etiquette listerEtiquettes();
	const ListeTransitions& getTransitions() const;

	void print();

	bool operator==(Etat&) const;

private:
	ListeTransitions transitions;
	bool initial;
	bool terminal;
	unsigned id;
};